﻿<Window x:Class="LayeredArchitectureSample.ClientBrowser.LocationsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        Height="300" Width="300"
        Title="Locations" WindowStartupLocation="CenterScreen" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
    <StackPanel>
        <ListView x:Name="LocationsListView" ItemsSource="{Binding Path=Locations}" SelectionMode="Single" SelectedItem="{Binding Path=CurrentlySelectedLocation}" Height="400" Width="400" MaxWidth="400" MaxHeight="400" VerticalAlignment="Top">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}"></GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        <StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Center">
            <Button Content="Add" Click="AddNewWareButtonClick" HorizontalAlignment="Left"></Button>
            <Button Content="Delete" IsEnabled="{Binding Path=IsSomethingSelected}" Click="RemoveItemButtonClick" Margin="20,0,0,0"></Button>
        </StackPanel>
        <Button x:Name="CloseButton" Content="Close the window" HorizontalAlignment="Center" Click="CloseDownButtonClick"></Button>
    </StackPanel>
</Window>